#ifndef __TEMP_H__
#define __TEMP_H__
#include <iostream>
#include <cassert>

template<typename T>
T Max(T a, T b)
{
    return a > b ? a : b;
}

template<typename T>
class MyVector
{
public:
    MyVector(int size = 10) {
        data = new T(size);
    }
    ~MyVector() {
        if(data != nullptr) {
            delete [] data;
            data = nullptr;
        }
    }

    // 访问
    T& at(int index) const {
        assert(index < length);
        return data[index];
    }
private:
    T* data;
    int length;
    int current_pos;
};

#endif //__TEMP_H__